package com.dao.purchase;

import com.model.purchase.PurchaseInquiry;
import com.model.purchase.PurchaseSupplyDeal;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

/**
 * @author chenjun
 * @description purchase_supply_deal
 * @date 2022-02-25
 */
public interface SupplyDealMapper {

	/**
	 * 新增
	 *
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int insert(PurchaseSupplyDeal purchaseSupplyDeal);

	/**
	 * 刪除
	 *
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int delete(String resId, String infId);

	// 根据resid删除
	int deleteByResId(String resId);

	/**
	 * 更新
	 *
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int update(PurchaseSupplyDeal purchaseSupplyDeal);

	/**
	 * 查询 根据主键 id 查询
	 *
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	PurchaseSupplyDeal load(@Param("resId") String resId, @Param("infId") String infId);
	
	PurchaseSupplyDeal loadByInfCodeAndRes(@Param("resId") String resId, @Param("infCode") String infCode);

	/**
	 * 查询 分页查询
	 *
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	List<PurchaseSupplyDeal> pageList(int offset, int pagesize);

	/**
	 * 查询 分页查询 count
	 *
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int pageListCount(int offset, int pagesize);

	List<PurchaseSupplyDeal> loadByResId(String resId);

	// 查询列表
	List<PurchaseSupplyDeal> selectList(Map<String, Object> map);

	// 查询列表
	int selectListCount(Map<String, Object> map);

}
